﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Web;
using System.Web.Security;

using Htss.Platform.Data;

namespace DreamBox.DAL.User
{
    public class FriendsLaunch
    {
        /// <summary>
        /// 删除好友申请记录
        /// </summary>
        /// <param name="FriendsID"></param>
        /// <returns></returns>
        public bool Delete(int LaunchID)
        {
            DbAction action = new DbAction("dbox_UserFriendsLaunch");
            action.SetFields("LaunchID", LaunchID, DbFieldType.Condition);
            return action.Delete();
        }
        /// <summary>
        /// 好友申请
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public GHashTable Add(DreamBox.Model.UserFriendsLaunch m)
        {
            DbProc gProc = new DbProc("dbox_proc_UserFriendsLaunch");
            gProc.SetFields("@LaunchUser",m.LaunchUser);
            gProc.SetFields("@TargetUser",m.TargetUser);
            gProc.SetFields("@returnMsg", "", SqlDbType.VarChar, 300, ParameterDirection.Output);
            return gProc.ExecNonQueryHashTable();
        }
    }
}
